Node-RED block in Snap4City Microservice library node-red-contrib-snap4city-user is "table-content">
With this node you can add a table-content to an existing dashboard or a new one created by the node to show table-content.
[
{
"metricId": [Service Uri Of A Sensor],
"metricHighLevelType": "Sensor",
"metricName": [The name of the Sensor],
"metricType": [A measure recorded by the sensor]
},
{
"metricId": [The ID of a KPI],
"metricHighLevelType": "MyKPI",
"metricName": [The name of the MyKPI],
"metricType": [The type of the measure saved in the KPI]
},
{
"metricId": "",
"metricHighLevelType": "Dynamic",
"metricName": [The name of the dynamic data],
"metricType": [The type of the dynamic data],
"metricValueUnit": [The unit of the dynamic data],
"measuredTime": [The ISO time of the measure of dynamic data],
"value": [A dynamic value]
}
]
You can insert an arbitrary number of MyKPI and Sensor element inside the array. An example of the JSON array filled with correct data:
[
{
"metricId": "https://servicemap.disit.org/WebAppGrafo/api/v1/?serviceUri=http://www.disit.org/km4city/resource/eCharging_15EP22T2AA1S000001&format=json",
"metricHighLevelType": "Sensor",
"metricName": "eCharging_15EP22T2AA1S000001",
"metricType": "chargingState",
"serviceUri": "http://www.disit.org/km4city/resource/eCharging_15EP22T2AA1S000001"
},
{
"metricId": "https://servicemap.disit.org/WebAppGrafo/api/v1/?serviceUri=http://www.disit.org/km4city/resource/eCharging_15EP22T2AA1S000001&format=json",
"metricHighLevelType": "Sensor",
"metricName": "eCharging_15EP22T2AA1S000001",
"metricType": "stationState",
"serviceUri": "http://www.disit.org/km4city/resource/eCharging_15EP22T2AA1S000001"
},
{
"metricId": "https://servicemap.disit.org/WebAppGrafo/api/v1/?serviceUri=http://www.disit.org/km4city/resource/eCharging_15EP22T2AA1S000002&format=json",
"metricHighLevelType": "Sensor",
"metricName": "eCharging_15EP22T2AA1S000002",
"metricType": "chargingState",
"serviceUri": "http://www.disit.org/km4city/resource/eCharging_15EP22T2AA1S000002"
},
{
"metricId": "https://servicemap.disit.org/WebAppGrafo/api/v1/?serviceUri=http://www.disit.org/km4city/resource/eCharging_15EP22T2AA1S000002&format=json",
"metricHighLevelType": "Sensor",
"metricName": "eCharging_15EP22T2AA1S000002",
"metricType": "stationState",
"serviceUri": "http://www.disit.org/km4city/resource/eCharging_15EP22T2AA1S000002"
},
{
"metricId": "https://servicemap.disit.org/WebAppGrafo/api/v1/?serviceUri=http://www.disit.org/km4city/resource/eCharging_15EP22T2AA1S000003&format=json",
"metricHighLevelType": "Sensor",
"metricName": "eCharging_15EP22T2AA1S000003",
"metricType": "chargingState",
"serviceUri": "http://www.disit.org/km4city/resource/eCharging_15EP22T2AA1S000003"
},
{
"metricId": "https://servicemap.disit.org/WebAppGrafo/api/v1/?serviceUri=http://www.disit.org/km4city/resource/eCharging_15EP22T2AA1S000003&format=json",
"metricHighLevelType": "Sensor",
"metricName": "eCharging_15EP22T2AA1S000003",
"metricType": "stationState",
"serviceUri": "http://www.disit.org/km4city/resource/eCharging_15EP22T2AA1S000003"
},
{
"metricId": "https://servicemap.disit.org/WebAppGrafo/api/v1/?serviceUri=http://www.disit.org/km4city/resource/eCharging_15EP22T2AA1S000004&format=json",
"metricHighLevelType": "Sensor",
"metricName": "eCharging_15EP22T2AA1S000004",
"metricType": "chargingState",
"serviceUri": "http://www.disit.org/km4city/resource/eCharging_15EP22T2AA1S000004"
},
{
"metricId": "https://servicemap.disit.org/WebAppGrafo/api/v1/?serviceUri=http://www.disit.org/km4city/resource/eCharging_15EP22T2AA1S000004&format=json",
"metricHighLevelType": "Sensor",
"metricName": "eCharging_15EP22T2AA1S000004",
"metricType": "stationState",
"serviceUri": "http://www.disit.org/km4city/resource/eCharging_15EP22T2AA1S000004"
},
{
"metricId": "http://www.disit.org/km4city/resource/tusc_weather_sensor_ow_3166540",
"metricHighLevelType": "Sensor",
"metricName": "tusc_weather_sensor_ow_3166540",
"metricType": "airTemperature"
},
{
"metricId": "https://servicemap.disit.org/WebAppGrafo/api/v1/?serviceUri=http://www.disit.org/km4city/resource/tusc_weather_sensor_ow_3182522&format=json",
"metricHighLevelType": "Sensor",
"metricName": "tusc_weather_sensor_ow_3182522",
"metricType": "airTemperature"
},
{
"metricId": "17056320",
"metricHighLevelType": "MyKPI",
"metricName": "SiiMTuscanyTrackerLocation",
"metricType": "Velocity"
},
{
"metricId": "",
"metricHighLevelType": "Dynamic",
"metricName": "BatteryTemperatureGalaxyNote",
"metricType": "Gradi Centigradi",
"metricValueUnit": "°C",
"measuredTime": "2019-11-21T14:51:00Z",
"value": 67.61641055980196
}
]